package com.kerrykidz.scminvoicing.dao.model;

import java.util.Date;
import java.util.List;

import com.rdp.framework.core.model.MyBatisSuperModel;
import com.rdp.framework.exception.RDPException;
import com.rdp.util.time.DateFormatUtil;

public class ScmSupPrdEntity extends MyBatisSuperModel {
   
    private String fkSupagmId;
    private String fkPrdId;
    private Double agmPrice;
    
    private String delFlag;
    private Date    modiTime;
    
   public String getDelFlag() {
		return delFlag;
	}

	public void setDelFlag(String delFlag) {
		this.delFlag = delFlag;
	}

	public Date getModiTime() {
		return modiTime;
	}

	public void setModiTime(Date modiTime) {
		this.modiTime = modiTime;
	}

	//业务扩展字段
    /**协议开始时间*/
    private  Date  agmFrom;
    /**协议结束时间*/
    private Date agmTo;
    /**时间字符转换*/
    private String agmFromPage;
    private String agmToPage;
    private String comments;
    
    private String fkAgmFile;
    
    private String agmFileName;
    
   // private String  
    /** 商品单位 **/
    private String unitName;
    
    /** 单个 商品 的协议价格 **/
    private Double agmPriceOne;
    
    /**供应商 编号 **/
    private String pkSupId;
    
    /** 商品名称 **/
    private String prdName;
    
    /** 商品规格 **/
    private String prdSpec;
    
    /**
     * 单个商品的 采购数量 
     */
    private Integer purCnt;
    /** 商品分类名称  **/
    private  String prdCateName;
    private List<String> prdInfo;//协议，商品，价格
    
    /**采购订单编号 **/
    private	String fkPurordId;
    
    
    public String getAgmFromPage() throws RDPException {
    	if(this.getAgmFrom()!=null){
    		return DateFormatUtil.convertDateToStr(this.getAgmFrom(), "yyyy-MM-dd");
    	}
		return agmFromPage;
	}

	public void setAgmFromPage(String agmFromPage) {
		this.agmFromPage = agmFromPage;
	}

	public String getAgmToPage() throws RDPException {
		if(this.getAgmTo()!=null){
    		return DateFormatUtil.convertDateToStr(this.getAgmTo(), "yyyy-MM-dd");
		}
		return agmToPage;
	}

	public void setAgmToPage(String agmToPage) {
		this.agmToPage = agmToPage;
	}

	public Date getAgmFrom() {
		return agmFrom;
	}

	public void setAgmFrom(Date agmFrom) {
		this.agmFrom = agmFrom;
	}

	public Date getAgmTo() {
		return agmTo;
	}

	public void setAgmTo(Date agmTo) {
		this.agmTo = agmTo;
	}

	public String getComments() {
		return comments;
	}

	public void setComments(String comments) {
		this.comments = comments;
	}

	public String getFkAgmFile() {
		return fkAgmFile;
	}

	public void setFkAgmFile(String fkAgmFile) {
		this.fkAgmFile = fkAgmFile;
	}

	public String getAgmFileName() {
		return agmFileName;
	}

	public void setAgmFileName(String agmFileName) {
		this.agmFileName = agmFileName;
	}

	public List<String> getPrdInfo() {
		return prdInfo;
	}

	public void setPrdInfo(List<String> prdInfo) {
		this.prdInfo = prdInfo;
	}

	public String getUnitName() {
		return unitName;
	}

	public void setUnitName(String unitName) {
		this.unitName = unitName;
	}

	public String getPrdName() {
		return prdName;
	}

	public void setPrdName(String prdName) {
		this.prdName = prdName;
	}

	public Double getAgmPrice() {
		return agmPrice;
	}

	public void setAgmPrice(Double agmPrice) {
		this.agmPrice = agmPrice;
	}

	public String getFkSupagmId() {
        return fkSupagmId;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column scm_sup_prd.FK_SUPAGM_ID
     *
     * @param fkSupagmId the value for scm_sup_prd.FK_SUPAGM_ID
     *
     * @mbggenerated Tue Aug 05 17:54:39 CST 2014
     */
    public void setFkSupagmId(String fkSupagmId) {
        this.fkSupagmId = fkSupagmId;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column scm_sup_prd.FK_PRD_ID
     *
     * @return the value of scm_sup_prd.FK_PRD_ID
     *
     * @mbggenerated Tue Aug 05 17:54:39 CST 2014
     */
    public String getFkPrdId() {
        return fkPrdId;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column scm_sup_prd.FK_PRD_ID
     *
     * @param fkPrdId the value for scm_sup_prd.FK_PRD_ID
     *
     * @mbggenerated Tue Aug 05 17:54:39 CST 2014
     */
    public void setFkPrdId(String fkPrdId) {
        this.fkPrdId = fkPrdId;
    }

	public Double getAgmPriceOne() {
		return agmPriceOne;
	}

	public void setAgmPriceOne(Double agmPriceOne) {
		this.agmPriceOne = agmPriceOne;
	}

	public String getPkSupId() {
		return pkSupId;
	}

	public void setPkSupId(String pkSupId) {
		this.pkSupId = pkSupId;
	}

	public String getPrdSpec() {
		return prdSpec;
	}

	public void setPrdSpec(String prdSpec) {
		this.prdSpec = prdSpec;
	}

	public String getPrdCateName() {
		return prdCateName;
	}

	public void setPrdCateName(String prdCateName) {
		this.prdCateName = prdCateName;
	}

	public Integer getPurCnt() {
		return purCnt;
	}

	public void setPurCnt(Integer purCnt) {
		this.purCnt = purCnt;
	}

	public String getFkPurordId() {
		return fkPurordId;
	}

	public void setFkPurordId(String fkPurordId) {
		this.fkPurordId = fkPurordId;
	}
}